import request from '@/utils/request'

export function createKnowledgeBase(data) {
  return request({
    url: '/api/llm/createKnowledgeBase',
    method: 'post',
    data
  })
}

export function uploadDocument(data) {
  return request({
    url: '/api/llm/uploadDocument',
    method: 'post',
    headers: {
      'Content-Type': 'multipart/form-data'
    },
    data
  })
}

export function getKnowledgeBases() {
    return request({
      url: '/api/llm/knowledgeBases',
      method: 'get',
    })
  }

export function chat(data) {
  return request({
    url: '/api/llm/chat',
    method: 'post',
    data
  })
}